<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Conexion
 *
 * @author Jesus Vasquez
 */
class Conexion {

    var $conex;
    var $host;

    function conexion() {
        $host = mysql_connect('localhost', 'root', '');
        if (!$host) {
            echo "Error de conexion";
        } else if ($host) {
            $conex = mysql_select_db('olimpiada', $host);
            //if ($conex)
            //    echo "Conexion exitosa";
        }
    }

    function getConexion() {
        return $this->conex;
    }

    function closeConexion() {
        mysql_close();
    }

}

?>
